/*
 * @Author: jares
 * @Date: 2023-09-25 15:03:11
 * @LastEditors: jares
 * @LastEditTime: 2023-09-28 10:13:10
 * @Description:
 *
 * Copyright (c) 2023 by jares, All Rights Reserved.
 */
// rollup.config.cjs
const { terser } = require('rollup-plugin-terser')
const json = require('@rollup/plugin-json')
const vue = require('rollup-plugin-vue')

module.exports = {
	input: './index.js',
	output: [
		{
			name: 'obj',
			file: 'dist/bundle.js',
			format: 'umd'
		},
		{
			file: 'dist/bundle.min.js',
			format: 'umd',
			name: 'version',
			plugins: [terser()]
		},
		{
			name: 'obj',
			file: 'dist/bundle.mjs',
			format: 'es'
		},
		{
			file: 'dist/bundle.min.mjs',
			format: 'es',
			name: 'version',
			plugins: [terser()]
		}
	],
	plugins: [
		vue({
			css: true,
			compileTemplate: true
		}),
		json()
	]
}
